package ru.dc.object.commands;

/**
 * Created by IntelliJ IDEA.
 * User: deady
 * Date: 01.11.2010
 * Time: 23:02:33
 * To change this template use File | Settings | File Templates.
 */
public class FileLength extends Command {

    private long length;

    @Override
    public String getActualCommandName() {
        return "$FileLength";
    }

    @Override
    public String generateCommand() {
        return getActualCommandName()+" "+getLength();
    }

    @Override
    public void parseCommand() {
        setLength(new Long(getCommand().substring(getActualCommandName().length()+1)));
    }

    public long getLength() {
        return length;
    }

    public void setLength(long length) {
        this.length = length;
    }
}
